<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>文件 | ccplus</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../c/structure.html" />
    
    
    <link rel="prev" href="../c/statement.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.8"
        data-chapter-title="文件"
        data-filepath="c/file.md"
        data-basepath=".."
        data-revision="Fri May 13 2016 17:02:07 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        目录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="Android/index.html">
            
                
                    <a href="../Android/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Android
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="Android/touchEvent.html">
            
                
                    <a href="../Android/touchEvent.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        触摸点击事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="Android/screenAdaptation.html">
            
                
                    <a href="../Android/screenAdaptation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        屏幕适配
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Android/android4.0.html">
            
                
                    <a href="../Android/android4.0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        4.0
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="c/index.html">
            
                
                    <a href="../c/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        c
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="c/Hello.html">
            
                
                    <a href="../c/Hello.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        Hello
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="c/DataType.html">
            
                
                    <a href="../c/DataType.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="c/operator.html">
            
                
                    <a href="../c/operator.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="c/array.html">
            
                
                    <a href="../c/array.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="c/pointer.html">
            
                
                    <a href="../c/pointer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="c/variables.html">
            
                
                    <a href="../c/variables.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        变量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="c/statement.html">
            
                
                    <a href="../c/statement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        语句
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.8" data-path="c/file.html">
            
                
                    <a href="../c/file.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="c/structure.html">
            
                
                    <a href="../c/structure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        结构体
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="c/function.html">
            
                
                    <a href="../c/function.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="c/multisource.html">
            
                
                    <a href="../c/multisource.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        多个源文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="c/gdb.html">
            
                
                    <a href="../c/gdb.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        gdb调试
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="linux/index.html">
            
                
                    <a href="../linux/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Linux
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="linux/command/index.html">
            
                
                    <a href="../linux/command/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        命令
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="c++/index.html">
            
                
                    <a href="../c++/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        C++
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="c++/section1.html">
            
                
                    <a href="../c++/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        第一节
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="c++/section2.html">
            
                
                    <a href="../c++/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        第二节
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="java/index.html">
            
                
                    <a href="../java/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        java
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="java/jni-java.html">
            
                
                    <a href="../java/jni-java.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        jni-java
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="java/jni-android.html">
            
                
                    <a href="../java/jni-android.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        jni-android
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="gitbook/index.html">
            
                
                    <a href="../gitbook/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        gitbook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="gitbook/installation.html">
            
                
                    <a href="../gitbook/installation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="gitbook/commands.html">
            
                
                    <a href="../gitbook/commands.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="gitbook/syntax.html">
            
                
                    <a href="../gitbook/syntax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="gitbook/settings.html">
            
                
                    <a href="../gitbook/settings.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="gitbook/plugins.html">
            
                
                    <a href="../gitbook/plugins.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        插件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="gitbook/bookjson.html">
            
                
                    <a href="../gitbook/bookjson.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        json
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >ccplus</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="file">file</h1>
<h3 id="&#x4F7F;&#x7528;&#x6587;&#x4EF6;&#x7684;&#x65B9;&#x5F0F;&#x5171;&#x6709;12&#x79CD;&#xFF0C;&#x4E0B;&#x9762;&#x7ED9;&#x51FA;&#x4E86;&#x5B83;&#x4EEC;&#x7684;&#x7B26;&#x53F7;&#x548C;&#x610F;&#x4E49;">&#x4F7F;&#x7528;&#x6587;&#x4EF6;&#x7684;&#x65B9;&#x5F0F;&#x5171;&#x6709;12&#x79CD;&#xFF0C;&#x4E0B;&#x9762;&#x7ED9;&#x51FA;&#x4E86;&#x5B83;&#x4EEC;&#x7684;&#x7B26;&#x53F7;&#x548C;&#x610F;&#x4E49;:</h3>
<table>
<thead>
<tr>
<th>&#x6587;&#x4EF6;&#x4F7F;&#x7528;&#x65B9;&#x5F0F;</th>
<th>&#x610F;&#x4E49;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&quot;rt&quot;</td>
<td>&quot;&#x53EA;&#x8BFB;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x53EA;&#x5141;&#x8BB8;&#x8BFB;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;wt&quot;</td>
<td>&quot;&#x53EA;&#x5199;&#x6253;&#x5F00;&#x6216;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x53EA;&#x5141;&#x8BB8;&#x5199;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;at&quot;</td>
<td>&quot;&#x8FFD;&#x52A0;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x5E76;&#x5728;&#x6587;&#x4EF6;&#x672B;&#x5C3E;&#x5199;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;rb&quot;</td>
<td>&quot;&#x53EA;&#x8BFB;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#xFF0C;&#x53EA;&#x5141;&#x8BB8;&#x8BFB;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;wb&quot;</td>
<td>&quot;&#x53EA;&#x5199;&#x6253;&#x5F00;&#x6216;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#xFF0C;&#x53EA;&#x5141;&#x8BB8;&#x5199;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;ab&quot;</td>
<td>&quot;&#x8FFD;&#x52A0;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#xFF0C;&#x5E76;&#x5728;&#x6587;&#x4EF6;&#x672B;&#x5C3E;&#x5199;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;rt+&quot;</td>
<td>&quot;&#x8BFB;&#x5199;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x5141;&#x8BB8;&#x8BFB;&#x548C;&#x5199;&quot;</td>
</tr>
<tr>
<td>&quot;wt+&quot;</td>
<td>&quot;&#x8BFB;&#x5199;&#x6253;&#x5F00;&#x6216;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x5141;&#x8BB8;&#x8BFB;&#x5199;&quot;</td>
</tr>
<tr>
<td>&quot;at+&quot;</td>
<td>&quot;&#x8BFB;&#x5199;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x5141;&#x8BB8;&#x8BFB;&#xFF0C;&#x6216;&#x5728;&#x6587;&#x4EF6;&#x672B;&#x8FFD;&#x52A0;&#x6570;&#x636E;&quot;</td>
</tr>
<tr>
<td>&quot;rb+&quot;</td>
<td>&quot;&#x8BFB;&#x5199;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#xFF0C;&#x5141;&#x8BB8;&#x8BFB;&#x548C;&#x5199;&quot;</td>
</tr>
<tr>
<td>&quot;wb+&quot;</td>
<td>&quot;&#x8BFB;&#x5199;&#x6253;&#x5F00;&#x6216;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#xFF0C;&#x5141;&#x8BB8;&#x8BFB;&#x548C;&#x5199;&quot;</td>
</tr>
<tr>
<td>&quot;ab+&quot;</td>
<td>&quot;&#x8BFB;&#x5199;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#xFF0C;&#x5141;&#x8BB8;&#x8BFB;&#xFF0C;&#x6216;&#x5728;&#x6587;&#x4EF6;&#x672B;&#x8FFD;&#x52A0;&#x6570;&#x636E;&quot;</td>
</tr>
</tbody>
</table>
<h3 id="&#x5BF9;&#x4E8E;&#x6587;&#x4EF6;&#x4F7F;&#x7528;&#x65B9;&#x5F0F;&#x6709;&#x4EE5;&#x4E0B;&#x51E0;&#x70B9;&#x8BF4;&#x660E;">&#x5BF9;&#x4E8E;&#x6587;&#x4EF6;&#x4F7F;&#x7528;&#x65B9;&#x5F0F;&#x6709;&#x4EE5;&#x4E0B;&#x51E0;&#x70B9;&#x8BF4;&#x660E;:</h3>
<ol>
<li>&#x6587;&#x4EF6;&#x4F7F;&#x7528;&#x65B9;&#x5F0F;&#x7531;r,w,a,t,b&#xFF0C;+&#x516D;&#x4E2A;&#x5B57;&#x7B26;&#x62FC;&#x6210;&#xFF0C;&#x5404;&#x5B57;&#x7B26;&#x7684;&#x542B;&#x4E49;&#x662F;&#xFF1A;<br>r(read): &#x8BFB;<br>w(write): &#x5199;<br>a(append): &#x8FFD;&#x52A0;<br>t(text): &#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x53EF;&#x7701;&#x7565;&#x4E0D;&#x5199;<br>b(banary): &#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;<br>+: &#x8BFB;&#x548C;&#x5199;    </li>
<li>&#x51E1;&#x7528;&#x201C;r&#x201D;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x65F6;&#xFF0C;&#x8BE5;&#x6587;&#x4EF6;&#x5FC5;&#x987B;&#x5DF2;&#x7ECF;&#x5B58;&#x5728;&#xFF0C; &#x4E14;&#x53EA;&#x80FD;&#x4ECE;&#x8BE5;&#x6587;&#x4EF6;&#x8BFB;&#x51FA;&#x3002;  </li>
<li>&#x7528;&#x201C;w&#x201D;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x53EA;&#x80FD;&#x5411;&#x8BE5;&#x6587;&#x4EF6;&#x5199;&#x5165;&#x3002; &#x82E5;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x4E0D;&#x5B58;&#x5728;&#xFF0C;&#x5219;&#x4EE5;&#x6307;&#x5B9A;&#x7684;&#x6587;&#x4EF6;&#x540D;&#x5EFA;&#x7ACB;&#x8BE5;&#x6587;&#x4EF6;&#xFF0C;&#x82E5;&#x6253;&#x5F00;&#x7684;&#x6587;&#x4EF6;&#x5DF2;&#x7ECF;&#x5B58;&#x5728;&#xFF0C;&#x5219;&#x5C06;&#x8BE5;&#x6587;&#x4EF6;&#x5220;&#x53BB;&#xFF0C;&#x91CD;&#x5EFA;&#x4E00;&#x4E2A;&#x65B0;&#x6587;&#x4EF6;&#x3002;</li>
<li>&#x82E5;&#x8981;&#x5411;&#x4E00;&#x4E2A;&#x5DF2;&#x5B58;&#x5728;&#x7684;&#x6587;&#x4EF6;&#x8FFD;&#x52A0;&#x65B0;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x53EA;&#x80FD;&#x7528;&#x201C;a &#x201D;&#x65B9;&#x5F0F;&#x6253;&#x5F00;&#x6587;&#x4EF6;&#x3002;&#x4F46;&#x6B64;&#x65F6;&#x8BE5;&#x6587;&#x4EF6;&#x5FC5;&#x987B;&#x662F;&#x5B58;&#x5728;&#x7684;&#xFF0C;&#x5426;&#x5219;&#x5C06;&#x4F1A;&#x51FA;&#x9519;&#x3002;   </li>
<li><p>&#x5728;&#x6253;&#x5F00;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x65F6;&#xFF0C;&#x5982;&#x679C;&#x51FA;&#x9519;&#xFF0C;fopen&#x5C06;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x7A7A;&#x6307;&#x9488;&#x503C;NULL&#x3002;&#x5728;&#x7A0B;&#x5E8F;&#x4E2D;&#x53EF;&#x4EE5;&#x7528;&#x8FD9;&#x4E00;&#x4FE1;&#x606F;&#x6765;&#x5224;&#x522B;&#x662F;&#x5426;&#x5B8C;&#x6210;&#x6253;&#x5F00;&#x6587;&#x4EF6;&#x7684;&#x5DE5;&#x4F5C;&#xFF0C;&#x5E76;&#x4F5C;&#x76F8;&#x5E94;&#x7684;&#x5904;&#x7406;&#x3002;&#x56E0;&#x6B64;&#x5E38;&#x7528;&#x4EE5;&#x4E0B;&#x7A0B;&#x5E8F;&#x6BB5;&#x6253;&#x5F00;&#x6587;&#x4EF6;:    </p>
<pre><code class="lang-c"><span class="hljs-keyword">if</span>((fp=fopen(<span class="hljs-string">&quot;c:\\hzk16&quot;</span>,<span class="hljs-string">&quot;rb&quot;</span>))==<span class="hljs-literal">NULL</span>){

<span class="hljs-comment">//&#x6587;&#x4EF6;&#x6253;&#x5F00;&#x5931;&#x8D25;&#x7684;&#x5904;&#x7406;</span>
}
</code></pre>
</li>
<li>&#x628A;&#x4E00;&#x4E2A;&#x6587;&#x672C;&#x6587;&#x4EF6;&#x8BFB;&#x5165;&#x5185;&#x5B58;&#x65F6;&#xFF0C;&#x8981;&#x5C06;ASCII&#x7801;&#x8F6C;&#x6362;&#x6210;&#x4E8C;&#x8FDB;&#x5236;&#x7801;&#xFF0C; &#x800C;&#x628A;&#x6587;&#x4EF6;&#x4EE5;&#x6587;&#x672C;&#x65B9;&#x5F0F;&#x5199;&#x5165;&#x78C1;&#x76D8;&#x65F6;&#xFF0C;&#x4E5F;&#x8981;&#x628A;&#x4E8C;&#x8FDB;&#x5236;&#x7801;&#x8F6C;&#x6362;&#x6210;ASCII&#x7801;&#xFF0C;&#x56E0;&#x6B64;&#x6587;&#x672C;&#x6587;&#x4EF6;&#x7684;&#x8BFB;&#x5199;&#x8981;&#x82B1;&#x8D39;&#x8F83;&#x591A;&#x7684;&#x8F6C;&#x6362;&#x65F6;&#x95F4;&#x3002;&#x5BF9;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#x7684;&#x8BFB;&#x5199;&#x4E0D;&#x5B58;&#x5728;&#x8FD9;&#x79CD;&#x8F6C;&#x6362;&#x3002;</li>
<li>&#x6807;&#x51C6;&#x8F93;&#x5165;&#x6587;&#x4EF6;(&#x952E;&#x76D8;)&#xFF0C;&#x6807;&#x51C6;&#x8F93;&#x51FA;&#x6587;&#x4EF6;(&#x663E;&#x793A;&#x5668; )&#xFF0C;&#x6807;&#x51C6;&#x51FA;&#x9519;&#x8F93;&#x51FA;(&#x51FA;&#x9519;&#x4FE1;&#x606F;)&#x662F;&#x7531;&#x7CFB;&#x7EDF;&#x6253;&#x5F00;&#x7684;&#xFF0C;&#x53EF;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x3002;&#x6587;&#x4EF6;&#x5173;&#x95ED;&#x51FD;&#x6570;fclose&#x6587;&#x4EF6;&#x4E00;&#x65E6;&#x4F7F;&#x7528;&#x5B8C;&#x6BD5;&#xFF0C;&#x5E94;&#x7528;&#x5173;&#x95ED;&#x6587;&#x4EF6;&#x51FD;&#x6570;&#x628A;&#x6587;&#x4EF6;&#x5173;&#x95ED;,&#x4EE5;&#x907F;&#x514D;&#x6587;&#x4EF6;&#x7684;&#x6570;&#x636E;&#x4E22;&#x5931;&#x7B49;&#x9519;&#x8BEF;&#x3002; 
fclose&#x51FD;&#x6570;:&#x8FD4;&#x56DE;0&#x8868;&#x793A;&#x6B63;&#x5E38;&#x5173;&#x95ED;&#xFF0C;&#x8FD4;&#x56DE;&#x975E;&#x96F6;&#x503C;&#x8868;&#x793A;&#x6709;&#x9519;&#x8BEF;&#x53D1;&#x751F;.    <h3 id="&#x6587;&#x4EF6;&#x7684;&#x8BFB;&#x5199;&#x51FD;&#x6570;">&#x6587;&#x4EF6;&#x7684;&#x8BFB;&#x5199;&#x51FD;&#x6570;:</h3>
<pre><code>&#xB7; &#x5B57;&#x7B26;&#x8BFB;&#x5199;&#x51FD;&#x6570; &#xFF1A;fgetc&#x548C;fputc
&#xB7; &#x5B57;&#x7B26;&#x4E32;&#x8BFB;&#x5199;&#x51FD;&#x6570;&#xFF1A;fgets&#x548C;fputs
&#xB7; &#x6570;&#x636E;&#x5757;&#x8BFB;&#x5199;&#x51FD;&#x6570;&#xFF1A;freed&#x548C;fwrite
&#xB7; &#x683C;&#x5F0F;&#x5316;&#x8BFB;&#x5199;&#x51FD;&#x6570;&#xFF1A;fscanf&#x548C;fprinf
</code></pre></li>
</ol>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../c/statement.html" class="navigation navigation-prev " aria-label="Previous page: 语句"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../c/structure.html" class="navigation navigation-next " aria-label="Next page: 结构体"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
